package thread;

public class Test {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            for (int i = 1,sum=0; i < 100;System.out.println(sum+=i),i+=2 );
        }) ;

        Thread t2 = new Thread(()->{
            for (int i = 2,sum=0; i < 100;System.out.println(sum+=i),i+=2 );
        }) ;

          /*  public void run() {
                for (int i = 1 sum = 0; i < 100; i++) {
                    if (i % 2 == 1) {
                    System.out.println(sum+i);
                    }
                }
            }
        };*/
        t1.start();
        t2.start();
    }

}
